package com.example.springboot;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

// SpringBoot 主类, 用于启动应用

/**
 * resource:
 *      static ==> 静态资源 css, html, js ...
 *      templates ==> 动态网页 : jsp html
 *      application.yml ==> 工程默认的配置文件
 *      application.yml
 *      application.yaml
 */
@SpringBootApplication
@MapperScan("com.example.springboot.mapper")
//@EnableScheduling
public class SpringbootApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpringbootApplication.class, args);
    }

    @Bean("helloMsg")
    public String helleMsg(){
        return "你好中国!";
    }

    // 定义服务器端管理器 Bean
    @Bean
    public ServerEndpointExporter serverEndpointExporter() {
        return new ServerEndpointExporter();
    }

}
